/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nanosl.minix.fxml;

import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;

/**
 * FXML Controller class
 *
 * @author sandun
 */
public class ItemViewController implements Initializable {
    @FXML
    private Button addButton;
    @FXML
    private Button clearButton;
    @FXML
    private TextField itemCodeNoTextField;
    @FXML
    private TextField itemNameTextField;
    @FXML
    private TextField sellingPriceTextField;
    @FXML
    private TextField buyingPriceTextField;

    /**
     * Initializes the controller class.
     */
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        // TODO
    }    

    @FXML
    private void add(ActionEvent event) {
    }

    @FXML
    private void clear(ActionEvent event) {
        itemCodeNoTextField.setText("");
        buyingPriceTextField.setText("");
        sellingPriceTextField.setText("");
        
    }

    @FXML
    private void gotoItemName(ActionEvent event) {
       itemNameTextField.requestFocus();
    }

    @FXML
    private void gotoBuyingPrice(ActionEvent event) {
      buyingPriceTextField.requestFocus();
    }

    @FXML
    private void gotoAddButton(ActionEvent event) {
        addButton.requestFocus();
    }

    @FXML
    private void gotoSellingPrice(ActionEvent event) {
        sellingPriceTextField.requestFocus();
    }
}
